package game.model.converter;

import common.model.po.GProduct;
import game.model.request.SaveProductRequest;

/**
 * 描述
 *
 * @author 米泽鹏
 * @since 2024-1-20 上午 2:03
 */
public class GProductConverter {

	public static GProduct saveRequestToPo(SaveProductRequest saveProductRequest) {
		if (saveProductRequest == null) {
			return null;
		}
		GProduct gProduct = new GProduct();
		gProduct.setClassificationId(saveProductRequest.getClassificationId());
		gProduct.setProductName(saveProductRequest.getProductName());
		gProduct.setImage(saveProductRequest.getImage());
		gProduct.setSort(saveProductRequest.getSort());
		gProduct.setId(saveProductRequest.getId());
		return gProduct;
	}

}
